<template>
    <div class="bar">
        <img class="returnImg" src="../assets/imgs/home/returnIcon2.png" alt="" v-on:click="back">
        <p class="title" style="padding:0;">{{text}}</p>
    </div>
</template>

<script>
export default {
    props: { text: String },
    components: {},
    data() {
        return {};
    },
    computed: {},
    created() {},
    mounted() {},
    methods: {
        back(){
            // console.log('11')
            // this.$store.routeAction = "pop";
            this.$router.go(-1);//返回上一层
        },
    }
}
</script>

<style scoped lang="scss">
.bar{
    display: flex;
    align-items: center;
    position: fixed;
    height: 48px;
    top: 0;
    left: 0;
    width: 100%;
    background:linear-gradient(270deg,rgba(64,134,231,1) 0%,rgba(37,94,215,1) 100%);
    box-shadow:0px 1px 15px 0px rgba(193,193,193,0.5);
    position: relative;
    .returnImg{
        z-index: 100;
        width: 10px;
        height: 19px;
        left: 16px;
        position: absolute;
        top: 14px;
    }
    .title{
        text-align: center;
        flex: 1;
        font-size: 18px;
        color: #fff;
        font-width: 500;
    }
}
</style>
